package com.bzframework.example.cloud.inventory.web;

import com.bzframework.example.cloud.api.UserServiceClient;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author bingzhong
 * @Date 2025/10/25
 */
@Slf4j
@RestController
@RequestMapping("/inventory")
@RequiredArgsConstructor
public class InventoryController {

    private final UserServiceClient userServiceClient;

    @GetMapping("/user/{id}")
    public String testGetUserById(@PathVariable String id) {
        return userServiceClient.getUserById(id);
    }

}
